// JavaScript Document



$(function(){
	 $("div.list_title p:not(.t_1)").hover(
	   function(){
		$(this).css({"background":"#F7F7F7","color":"#5DAF27","cursor":"pointer"});
	   },
	   function(){
		$(this).css({"background":"#F7F7F7","color":"#666666"});
      });


     $("#c_brand li:not(.style_1)").click(function(){					   
	   $(this).css({"color":"#fff","background":"#A5D610"})         
	     .siblings().css({"color":"#636363","background":"#FFFFFF"});  
     });

});

var Search = {
		 gotoUrl : function(url){
	          window.location = url;
         },
		
		 resultPaginate : function(page){
        	var keywords = $('#keywords').val();
        	var cid = $('#selected_cid').val();
        	var brand = $('#selected_brand').val();
        	var lprice = $('#lowestPrice').val();
        	var hprice = $('#highestPrice').val();
        	
        	
        	var data = {
        			   "paginate" : 1,
        			   "lowestPrice" : lprice,
        			   "highestPrice" : hprice,
        			   "brand" : brand,
        	           "keywords" :keywords,
        	           "cid" : cid,
        	           "page" : page
        			   };
        	$.ajax({
                type: 'POST',
                url: '/s/',
                dataType: "html",
                data: data,
                async: false,
                success: function(responseText){
                   $('#c_right').html(responseText);
                   $('.pro_list img').hover(
                		function(){
                		   $(this).css({"border":"solid #55A01E 1px","cursor":"pointer"});
                		},
                		function(){
                		  $(this).css({"border":"solid #E5E5E5 1px"});

                        }
                	);
                }
               
            });


        	
        }
}